package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName medical_item
 */
@TableName(value ="medical_item")
public class MedicalItem {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Item code
     */
    @TableField(value = "code")
    private String code;

    /**
     * Item name
     */
    @TableField(value = "name")
    private String name;

    /**
     * Specification
     */
    @TableField(value = "specification")
    private String specification;

    /**
     * Unit price
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * Expense category ID
     */
    @TableField(value = "expense_category_id")
    private Integer expenseCategoryId;

    /**
     * Execution department ID
     */
    @TableField(value = "department_id")
    private Integer departmentId;

    /**
     * Mnemonic code
     */
    @TableField(value = "mnemonic_code")
    private String mnemonicCode;

    /**
     * Creation time
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * Last update time
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * Item type
     */
    @TableField(value = "record_type")
    private Integer recordType;

    /**
     * Delete flag
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Item code
     */
    public String getCode() {
        return code;
    }

    /**
     * Item code
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * Item name
     */
    public String getName() {
        return name;
    }

    /**
     * Item name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Specification
     */
    public String getSpecification() {
        return specification;
    }

    /**
     * Specification
     */
    public void setSpecification(String specification) {
        this.specification = specification;
    }

    /**
     * Unit price
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * Unit price
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * Expense category ID
     */
    public Integer getExpenseCategoryId() {
        return expenseCategoryId;
    }

    /**
     * Expense category ID
     */
    public void setExpenseCategoryId(Integer expenseCategoryId) {
        this.expenseCategoryId = expenseCategoryId;
    }

    /**
     * Execution department ID
     */
    public Integer getDepartmentId() {
        return departmentId;
    }

    /**
     * Execution department ID
     */
    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    /**
     * Mnemonic code
     */
    public String getMnemonicCode() {
        return mnemonicCode;
    }

    /**
     * Mnemonic code
     */
    public void setMnemonicCode(String mnemonicCode) {
        this.mnemonicCode = mnemonicCode;
    }

    /**
     * Creation time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * Creation time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * Last update time
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * Last update time
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * Item type
     */
    public Integer getRecordType() {
        return recordType;
    }

    /**
     * Item type
     */
    public void setRecordType(Integer recordType) {
        this.recordType = recordType;
    }

    /**
     * Delete flag
     */
    public Integer getIsDeleted() {
        return isDeleted;
    }

    /**
     * Delete flag
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MedicalItem other = (MedicalItem) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getSpecification() == null ? other.getSpecification() == null : this.getSpecification().equals(other.getSpecification()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getExpenseCategoryId() == null ? other.getExpenseCategoryId() == null : this.getExpenseCategoryId().equals(other.getExpenseCategoryId()))
            && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId()))
            && (this.getMnemonicCode() == null ? other.getMnemonicCode() == null : this.getMnemonicCode().equals(other.getMnemonicCode()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getRecordType() == null ? other.getRecordType() == null : this.getRecordType().equals(other.getRecordType()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getSpecification() == null) ? 0 : getSpecification().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getExpenseCategoryId() == null) ? 0 : getExpenseCategoryId().hashCode());
        result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode());
        result = prime * result + ((getMnemonicCode() == null) ? 0 : getMnemonicCode().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getRecordType() == null) ? 0 : getRecordType().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", name=").append(name);
        sb.append(", specification=").append(specification);
        sb.append(", price=").append(price);
        sb.append(", expenseCategoryId=").append(expenseCategoryId);
        sb.append(", departmentId=").append(departmentId);
        sb.append(", mnemonicCode=").append(mnemonicCode);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", recordType=").append(recordType);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append("]");
        return sb.toString();
    }
}